/**
 * 树
 */
public class test20 {
    public static void main(String[] args) {
        int start=1;
        int sum=2019;
        while(sum>=0){
            sum-=start;
            start*=2;
//			System.out.println(sum);
        }
        System.out.println(start/2);
        System.out.println(sum);
    }
}
